home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MISC / SHELL.ARC / Shell / Sources / c / PlotIcon < prev    next >
Text File  |  1994-05-17  |  948b  |  33 lines

  1. #include "DeskLib:WimpSWIs.h"
  2. #include "DeskLib:Coord.h"
  3. #include "DeskLib:Wimp.h"
  4.  
  5. #include "Shell.Extra.h"
  6. #include "Shell.PlotIcon.h"
  7.  
  8.  
  9. #define PLOTMAX 16384
  10.  
  11.  
  12. os_error *Shell_PlotIcon( icon_block *icon,Shell_convertpoint convert)
  13.     /* Plots an icon using Wimp_PlotIcon, but first clips the workarearect    */
  14.     /* of the icon so that all screen coors are 16 bits.            */
  15.     /* Restores the old workarearect before returning            */
  16. {
  17. wimp_rect    backupworkarearect;
  18. os_error    *err;
  19.  
  20. backupworkarearect = icon->workarearect;
  21.  
  22. Shell_MakeGE( icon->workarearect.min.x, Shell_ConvertXToWorkarea( -PLOTMAX, convert));
  23. Shell_MakeGE( icon->workarearect.min.y, Shell_ConvertYToWorkarea( -PLOTMAX, convert));
  24. Shell_MakeLE( icon->workarearect.max.x, Shell_ConvertXToWorkarea(  PLOTMAX, convert));
  25. Shell_MakeLE( icon->workarearect.max.y, Shell_ConvertYToWorkarea(  PLOTMAX, convert));
  26.  
  27. err = Wimp_PlotIcon( icon);
  28.  
  29. icon->workarearect = backupworkarearect;
  30.  
  31. return err;
  32. }
  33.